SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 42504: Special characters in DBMS column names cause problems with the explicit pass-through option in the SAS® Enterprise Guide® 4.3 Query Builder

DetailsAboutRate It

When querying DBMS tables in SAS Enterprise Guide 4.3 using the explicit pass-through option, errors can occur if the DBMS table contains column names with special characters.

Because SAS Enterprise Guide uses the option VALIDVARNAME=ANY by default, tables are opened with special characters in the variable names. If you use the explicit pass-through option, the query is generated with the variable in a name literal, which is invalid database syntax and generates a error that is similar to the following.

ERROR: CLI describe error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'VAR3#'. : [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.

If the option VALIDVARNAME=V7 is used when SAS Enterprise Guide connects to the server, the special characters in the variable names are converted to underscores. However, submitting the pass-through query still generates an error, such as the following, because SAS cannot find the variable name in the table.

ERROR: CLI describe error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'VAR3_'. : [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.

Currently, the workarounds are the following:

  • Use a program node to submit code instead of the Query Builder.
  • Do not use explicit pass-through to query the DBMS table.
  • Rename the variables to remove the special characters before submitting the query.


Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS Enterprise GuideMicrosoft® Windows® for x644.35.19.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 Datacenter Edition4.35.19.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 Enterprise Edition4.35.19.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 Standard Edition4.35.19.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 for x644.35.19.2 TS2M39.3 TS1M0
Microsoft Windows Server 20084.35.19.2 TS2M39.3 TS1M0
Microsoft Windows Server 2008 for x644.35.19.2 TS2M39.3 TS1M0
Microsoft Windows XP Professional4.35.19.2 TS2M39.3 TS1M0
Windows 7 Enterprise 32 bit4.35.19.2 TS2M39.3 TS1M0
Windows 7 Enterprise x644.35.19.2 TS2M39.3 TS1M0
Windows 7 Home Premium 32 bit4.35.19.2 TS2M39.3 TS1M0
Windows 7 Home Premium x644.35.19.2 TS2M39.3 TS1M0
Windows 7 Professional 32 bit4.35.19.2 TS2M39.3 TS1M0
Windows 7 Professional x644.35.19.2 TS2M39.3 TS1M0
Windows 7 Ultimate 32 bit4.35.19.2 TS2M39.3 TS1M0
Windows 7 Ultimate x644.35.19.2 TS2M39.3 TS1M0
Windows Vista4.35.19.2 TS2M39.3 TS1M0
Windows Vista for x644.35.19.2 TS2M39.3 TS1M0
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.